<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/18
 * Time: 15:39
 */

namespace addons\admin\service;


class Goods
{
    /**
     * 获取商品列表
     * @param $param
     * @return false|\PDOStatement|string|\think\Collection|\think\Paginator
     */
    static function list_($cond,$param)
    {
        $c = new \app\common\model\Goods();
        if (isset($param["export"]) && $param["export"] == 1) {   #导出数据
            $r_data = $c->where($cond)->select();
        }else   #查询数据
        {
            $r_data = $c->where($cond)->paginate(30,false,['query'=>request()->param()]);
        }
        return $r_data;
    }
}